Problem Note 56969: The results of PROC ODSLIST and PROC ODSTEXT are displayed in reverse order if the ODS DOCUMENT destination is open
When you use ODS DOCUMENT to store the results of PROC ODSLIST or PROC ODSTEXT and another ODS destination is open at the same time, the order of the text is reversed.
To circumvent the problem, route the results to the ODS DOCUMENT destination alone. Then use PROC DOCUMENT to replay the results to any other ODS destination. Click the Full Code tab to see sample code that demonstrates this.
Operating System and Release Information
SAS System | Base SAS | Linux for x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Solaris for x64 | 9.4 TS1M0 | 9.4 TS1M4 |
HP-UX IPF | 9.4 TS1M0 | 9.4 TS1M4 |
64-bit Enabled Solaris | 9.4 TS1M0 | 9.4 TS1M4 |
64-bit Enabled AIX | 9.4 TS1M0 | 9.4 TS1M4 |
Windows 7 Professional x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Windows 7 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Std | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 10 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M4 |
Microsoft® Windows® for x64 | 9.4 TS1M0 | 9.4 TS1M4 |
z/OS 64-bit | 9.4 TS1M0 | 9.4 TS1M4 |
z/OS | 9.4 TS1M0 | 9.4 TS1M4 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The sample code below creates Problem.html, which is created when both the ODS DOCUMENT and ODS HTML destinations are open. The ODSLIST and ODSTEXT output is reversed. Solution.html is created by a replay of the document with PROC DOCUMENT using the ODS HTML destination. Click the
Output tab to see the results.
/* Problem: */
ods document name=test(write);
ods html file="problem.html";
title "ODS DOCUMENT and HTML destinations are open";
proc odstext;
p "LINE 1: ODSTEXT ";
p "LINE 2: ODSTEXT ";
run;
proc odslist;
item;
p 'LINE 1: ODSLIST ';
list;
item 'LINE 2: ODSLIST';
end;
end;
run;
ods document close;
ods html close;
/*Solution:*/
ods _all_ close;
ods document name=test(write);
title "only ODS DOCUMENT destination is open for creation of document itemstore";
proc odstext;
p "LINE 1: ODSTEXT ";
p "LINE 2: ODSTEXT ";
run;
proc odslist ;
item;
p 'LINE 1: ODSLIST ' ;
list;
item 'LINE 2: ODSLIST';
end;
end;
run;
ods document close;
ods html file="solution.html";
proc document name=test;
replay;
run;
quit;
ods html close;
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2015-11-04 11:34:34 |
Date Created: | 2015-10-30 10:58:29 |